package com.efeichong.common.domain.entity.redis;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.TimeToLive;

import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * @author lxk
 * @date 2020/9/2
 * @description 验证码
 */
@Data
@RedisHash
@ApiModel("验证码")
public class VerifyCode {
    @Id
    private String id;
    @JsonIgnore
    private String code;
    @JsonIgnore
    @TimeToLive
    private Long expire = 120L;
    @Transient
    private String image;

}
